<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>test</title>
</head>
<body>
    <button onclick="fn()">open</button>
</body>
<script>
    var socket = new WebSocket('ws://192.168.71.136:83/games');
    function fn(){
        socket.send(JSON.stringify({
            type:'join'
        }))
    }
    socket.onmessage = function(e){
        console.log(JSON.parse(e.data));
    }
</script>
</html>